package com.soecode.wxtools.bean.result;

import java.io.IOException;
import java.util.List;

import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;

import com.soecode.wxtools.bean.WxOnlineKf;

public class WxOnlineKfResult {
	
	private List<WxOnlineKf> kf_list;

	public List<WxOnlineKf> getKf_list() {
		return kf_list;
	}

	public void setKf_list(List<WxOnlineKf> kf_list) {
		this.kf_list = kf_list;
	}

	@Override
	public String toString() {
		return "WxOnlineKfResult [kf_list=" + kf_list + "]";
	}

	/**
	 * json --> obj
	 * @return
	 * @throws JsonGenerationException
	 * @throws JsonMappingException
	 * @throws IOException
	 */
	public static WxOnlineKfResult fromJson(String json) throws JsonParseException, JsonMappingException, IOException {
		ObjectMapper mapper = new ObjectMapper();
		mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
		return mapper.readValue(json, WxOnlineKfResult.class);
	}

}
